import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 默认路径 路由重定向
  {
    path: '/',
    redirect: '/login'
  },
  //登录页
  {
    path: '/login',
    name: 'login',
    component: () => import('../components/login.vue')
  },
  // 首页
  {
    path: '/index',
    name: 'index',
    redirect: '/welcome',
    component: () => import('../views/index/index.vue'),
    children: [
      // 欢迎页面相当于首页
      {
        path: '/welcome',
        name: 'welcome',
        component: () => import('../components/welcome.vue'),
      },
      // 星座物语-----------------------------》
      // 星座物语火象
      {
        path: '/firesigns',
        name: 'firesigns',
        component: () => import('../views/signs/firesigns/firesign.vue'),
      },
      // 星座物语水象
      {
        path: '/watersigns',
        name: 'watersigns',
        component: () => import('../views/signs/watersigns/watersign.vue'),
      },
      // 星座物语土象
      {
        path: '/earthsigns',
        name: 'earthsigns',
        component: () => import('../views/signs/earthsigns/earthsign.vue'),
      },
      // 星座物语风象
      {
        path: '/airsigns',
        name: 'airsigns',
        component: () => import('../views/signs/airsigns/airsign.vue'),
      },
      // 励志语录------------------------------------------------->
      // 成长
      {
        path: '/growup',
        name: 'growup',
        component: () => import('../views/quotations/growups/growup.vue'),
      },
      // 青春
      {
        path: '/youth',
        name: 'youth',
        component: () => import('../views/quotations/youths/youth.vue'),
      },
      // 爱情
      {
        path: '/love',
        name: 'love',
        component: () => import('../views/quotations/loves/love.vue'),
      },
      // 留言板-------------------------------------------------------------》
      {
        path: '/allboard',
        name: 'allboard',
        component: () => import('../views/boards/allboard.vue'),
      },
      // 音乐
      {
        path: '/music',
        name: 'music',
        component: () => import('../views/music/music.vue'),
      },


    ]
  }
]
const router = new VueRouter({
      routes
    })

export default router
